package cn.haoshuai.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.haoshuai.dao.UserDao;
import cn.haoshuai.entity.User;
@Service("userService")
@Transactional
public class UserServiceImp implements UserService {
	@Resource
	private UserDao userDao;
	public User findUserByName(String name,String password) {
		User user = userDao.findUserByName(name);
		if (user != null && user.getPassword().equals(password)) {
			return user;
		}
		return null;
		
	}

}
